using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Windows.Forms;

using DoAn_LyThuyet.HeThongXuLy;

namespace DoAn_LyThuyet.HeThongLuuTru
{
    class NguoiDungDAO
    {
        public static bool KiemTraNguoiDung(NguoiDungDTO user) 
        {
            string sql = "select * from NguoiDung where TenNguoiDung = '" + user.TenNguoiDung + "' and MatKhau = '" + user.MatKhau + "'";
            DataTable dt = DataAccess.GetTable(sql);// ExecQuery(sql);
            if (dt.Rows.Count != 0) 
            { 
                return true;

            }
            else 
            { 
                return false;
            }
        } 
        public static DataTable LayDanhSachNguoiDung()
        { 
            string sql = "Select * from NguoiDung";
            return DataAccess.GetTable(sql); // ExecQuery(sql);
        }
        

    }
}
